#ifndef __CONDITION_H__
#define __CONDITION_H__

#include "NonCopyable.h"
#include <pthread.h>

namespace myNameSpace {
class MutexLock;

class Condition: NonCopyable {
public:
    Condition(MutexLock &mutexLock);
    ~Condition();

    void wait();
    void notify();
    void notifyAll();

private:
    pthread_cond_t _cond;
    MutexLock &_mutexLock;
};
} // end of namespace myNameSpace

#endif

